package intgrafica.principal;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class TelaMedidasTorax extends Activity{
	private String altura;
	private String massa;
	private String imc;
	private String situacao;
	private String braco;
	private EditText campoTorax;
	
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.telamedidastorax);
		
		campoTorax = (EditText) findViewById(R.id.editText1);
		
		Intent it = getIntent();
		if(it != null){
			Bundle params = it.getExtras();
			if(params != null){
				altura = params.getString("altura");
				massa = params.getString("peso");
				imc = params.getString("imc");
				situacao = params.getString("situacao");
				braco = params.getString("braco");
			}
		}
		
		Button proximo = (Button) findViewById(R.id.button1);
		proximo.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				Intent it = new Intent(TelaMedidasTorax.this,
						TelaMedidasPunho.class);
				it.putExtra("altura", altura);
				it.putExtra("peso", massa);
				it.putExtra("imc", imc);
				it.putExtra("situacao", situacao);
				it.putExtra("braco", braco);
				it.putExtra("torax", campoTorax.getText().toString());
				startActivity(it);
			}
		});
		
		Button voltar = (Button) findViewById(R.id.button2);
		voltar.setOnClickListener(new OnClickListener() {
			public void onClick(View v) {
				finish();
			}
		});
	}
}
